package com.cheyun.netsalev3.viewmodel

import androidx.databinding.ObservableField
import com.cheyun.netsalev3.bean.StockDetailsParam
import com.cheyun.netsalev3.repository.StockDetailsRepository

class StockDetailsActivityViewModel(stockDetailsRepository: StockDetailsRepository) : BaseViewModel() {
    var data = ObservableField<StockDetailsParam>()

    init {
        stockDetailsRepository.getStock(this::setData)
    }

    fun setData(item: StockDetailsParam) {
        data.set(item)
    }

}